﻿using Abp.Application.Services.Dto;
using Abp.AutoMapper;
using SingleUserMall.Authorization.Users;
using SingleUserMall.Orders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static SingleUserMall.Commissions.Commission;

namespace SingleUserMall.Users.VO
{
    [AutoMapFrom(typeof(UserCommission))]
    public class UserCommissionVO:EntityDto<long>
    {
        internal User inFromUser { get; set; }
        /// <summary>
        /// 佣金金额
        /// </summary>
        public decimal Amount { get; set; }
        /// <summary>
        /// 时间
        /// </summary>
        public DateTime CreationTime { get; set; }
        /// <summary>
        /// 用户头像
        /// </summary>
        public string Avatar => inFromUser?.Avatar;
        /// <summary>
        /// 用户昵称
        /// </summary>
        public string Name => inFromUser?.Name;
        /// <summary>
        /// 商品名称
        /// </summary>
        public string ItemName { get; set; }

        /// <summary>
        /// 佣金类型
        /// </summary>
        public CommissionType? CommissionType { get; set; }
    }
}
